{% layout="base.html" %}
{-main_header-}
{-main_header-}

{-main-}
{% if lwf.auth.user == 'Guest' then %}
{% if message then %}
<div class="ui red message">{{ _(message) }}</div>
{% end %}

<div class="ui centered stackable grid">
	<div class="six wide column">
		<div class="ui segments" align="center">
			<div class="ui padded segment">
				<span class="ui header">{{_("Welcome in FreeIOE")}}</span>
			</div>
			<div class="ui segment">
				<form class="ui login form" action="/user/login" method="POST">
					<div class="filed">
						<input type="hidden" name="from_web" value="1">
					</div>
					<div class="field">
						<div class="ui left icon input">
							<input type="text" name="username" placeholder="Username">
							<i class="user icon"></i>
						</div>
					</div>
					<div class="field">
						<div class="ui left icon input">
							<input type="password" name="password" placeholder="Password">
							<i class="lock icon"></i>
						</div>
					</div>
					<!--
					<div class="field">
						<div class="ui checkbox">
							<input type="checkbox" tabindex="0" class="hidden">
							<label>{{_("Remember Me")}}</label>
						</div>
					</div>
					--!>
					<button class="ui big fluid blue icon button" type="submit">
						{{_('Sign In')}} <i class="sign in icon"></i>
					</button>
					<div class="ui error message"></div>
				</form>
			</div>
			<div class="ui secondary segment">
				<a class="green ui labeled icon button" href="/user/register">
					<i class="signup icon"></i>
					{{_('Sign Up')}}
				</a>
				<a href="">Forgot Password?</a>
			</div>
		</div>
	</div>
</div>
{% else %}
<div class="ui centered stackable grid">
	<div class="ui basic segments" align="center">
		<div class="ui basic padded segment">
			<h1 class="ui blue header">{{_("Welcome %s", lwf.auth.user) }}</h1>
		</div>
		<div class="ui basic padded segment">
			<a class="ui big basic button" href="/user/home"><i class="home icon"></i> {{_("Home")}} </a>
			<a class="ui big basic button" href="/dashboard"><i class="dashboard icon"></i> {{_("Dashboard")}} </a>
			<a class="ui big basic button" href="/app"><i class="cubes icon"></i> {{_("Application")}} </a>
			<a class="ui big basic button" href="/device"><i class="list layout icon"></i> {{_("Device")}} </a>
		</div>
	</div>
</div>
{% end %}
{-main-}
